﻿headgear_armor = {

    usage = game
    selection_behavior = weighted_random
    priority = 4

    ## DDE HRE ##

    dde_hre_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = dde_hre_war
                accessory = m_headgear_sec_dde_hre_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = dde_hre
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = dde_hre
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = dde_hre
                    }
                }
            }
            modifier = {
                factor = 0       # Should NOT show up if EP2 is active and we're not in the right era
                has_ep2_dlc_trigger = yes
                NOT = { portrait_era3_trigger = yes }
            }
        }
    }

    dde_hre_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = dde_hre_war
                accessory = m_headgear_sec_dde_hre_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = dde_hre
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = dde_hre
                }
            }
            modifier = {
                factor = 0       # Should NOT show up if EP2 is active and we're not in the right era
                has_ep2_dlc_trigger = yes
                NOT = { portrait_era3_trigger = yes }
            }
        }
    }

    dde_hre_war_royalty = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = dde_hre_war
                accessory = m_headgear_sec_dde_hre_war_nob_01_roy
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = dde_hre
                }
                portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = dde_hre
                }
            }
            modifier = {
                factor = 0       # Should NOT show up if EP2 is active and we're not in the right era
                has_ep2_dlc_trigger = yes
                NOT = { portrait_era3_trigger = yes }
            }
		}
	}

## Western ##

	western_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = western_war
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 50
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
			}
            modifier = {
                factor = 0       # Should NOT show up if EP2 is active and we're not in the right era
                has_ep2_dlc_trigger = yes
                portrait_era1_trigger = yes
            }
		}
	}

	ep2_western_era1_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era1_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				portrait_era1_armor_trigger = yes
			}
		}
	}

	ep2_western_era2_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era2_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
                OR = {
                    portrait_era2_armor_trigger = yes
                    portrait_era3_armor_trigger = yes
                }
			}
		}
	}

	ep2_western_era3_war_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				value = 0
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = western
                    }
                    AND = {
                        OR = {
                            portrait_low_nobles_armor_trigger = {
                                CULTURE_INPUT = western
                            }
                            portrait_high_nobles_armor_trigger = {
                                CULTURE_INPUT = western
                            }
                        }
                        portrait_wear_armor_currently_in_army_trigger = no
                    }
                }
				has_ep2_dlc_trigger = yes
				portrait_era3_trigger = yes # not using the armor trigger here because that was changed to be less historically accurate
			}
		}
	}

	ep2_western_era3_war_low_nobles = { # Greathelm
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				value = 0.5
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 90
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
                portrait_low_nobles_armor_trigger = {
                    CULTURE_INPUT = western
                }
                portrait_wear_armor_currently_in_army_trigger = yes
				has_ep2_dlc_trigger = yes
				portrait_era3_trigger = yes # not using the armor trigger here because that was changed to be less historically accurate
			}
		}
	}

	ep2_western_era3_war_high_nobles = { # Greathelm with torse, mantle and crest
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era3_war_nobility
				value = 1
			}
            accessory = {
                mode = add
                gene = additive_headgear
                template = coa_crest
                value = 1
            }
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = western
                }
                portrait_wear_armor_currently_in_army_trigger = yes
				has_ep2_dlc_trigger = yes
				portrait_era3_trigger = yes # not using the armor trigger here because that was changed to be less historically accurate
			}
		}
	}

	ep2_western_era4_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = ep2_western_era4_war_nobility
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = western
				}
				has_ep2_dlc_trigger = yes
				portrait_era4_armor_trigger = yes
			}
		}
	}

	crusades_western_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = crusades_western_war
				range = { 0 1 } # For the randomness to work correctly
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 110
				portrait_wear_helmet_trigger = yes
				portrait_western_crusades_trigger = yes
			}
			modifier = {
				add = 110
				portrait_wear_helmet_trigger = yes
				portrait_ep2_disguised_woman_trigger = yes
			}
		}
	}

## Byzantine ##

    byzantine_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = byzantine_war
                accessory = m_headgear_sec_byzantine_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = byzantine
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = byzantine
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = byzantine
                    }
                }
            }
        }
    }

    byzantine_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = byzantine_war
                accessory = m_headgear_sec_byzantine_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = byzantine
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = byzantine
                }
            }
        }
    }

    byzantine_war_royalty = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = byzantine_war
                accessory = m_headgear_sec_byzantine_war_nob_01_roy
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = byzantine
                }
                portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = byzantine
                }
            }
        }
    }

    ep2_byzantine_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ep2_byzantine_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = byzantine
                }
                has_ep2_dlc_trigger = yes
            }
            modifier = {
                factor = 0        # Not used if EP3 is active and we're in the wrong era
                has_ep3_dlc_trigger = yes
                OR = {
                    portrait_era1_armor_trigger = yes
                    portrait_era2_armor_trigger = yes
                }
            }
        }
    }

    ep3_byzantine_era1_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ep3_byzantine_era1_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = byzantine
                }
                has_ep3_dlc_trigger = yes
                OR = {
                    portrait_era1_armor_trigger = yes
                    portrait_era2_armor_trigger = yes
                }
            }
        }
    }

    ep3_byzantine_era2_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ep3_byzantine_era2_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = byzantine
                }
                has_ep3_dlc_trigger = yes
                OR = {
                    portrait_era3_armor_trigger = yes
                    portrait_era4_armor_trigger = yes
                }
            }
        }
    }

    ## Indian ##

    indian_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = indian_war
                accessory = m_headgear_sec_indian_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = indian
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = indian
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = indian
                    }
                }
            }
        }
    }

    indian_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = indian_war
                accessory = m_headgear_sec_indian_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = indian
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = indian
                }
            }
        }
    }

    indian_war_royalty = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = indian_war
                accessory = m_headgear_sec_indian_war_nob_01_roy
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = indian
                }
                portrait_royalty_armor_trigger = {
                    CULTURE_INPUT = indian
                }
            }
        }
    }

    ep2_indian_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ep2_indian_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = indian
                }
                has_ep2_dlc_trigger = yes
            }
        }
    }

    ## MENA ##

    mena_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = mena_war
                range = { 0 0.49 }
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = mena
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = mena
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = mena
                    }
                }
            }
        }
    }

    mena_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = mena_war
                range = { 0.51 1 }
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = mena
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = mena
                }
            }
        }
    }

    ep2_mena_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ep2_mena_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = mena
                }
                has_ep2_dlc_trigger = yes
            }
        }
    }

    ## DDE Abbasid ##

    dde_abbasid_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = dde_abbasid_war
                accessory = m_headgear_sec_dde_abbasid_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = dde_abbasid
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = dde_abbasid
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = dde_abbasid
                    }
                }
            }
        }
    }

    dde_abbasid_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = dde_abbasid_war
                accessory = m_headgear_sec_dde_abbasid_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = dde_abbasid
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = dde_abbasid
                }
            }
        }
    }

    ## Steppe ##

    steppe_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = steppe_war
                accessory = m_headgear_sec_steppe_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = steppe
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = steppe
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = steppe
                    }
                }
            }
        }
    }

    steppe_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = steppe_war
                accessory = m_headgear_sec_steppe_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = steppe
                }
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp3_turkic
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = steppe
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = fp3_turkic
                }
                portrait_high_nobles_armor_in_army_trigger = {
                    CULTURE_INPUT = fp3_turkic
                }
            }
        }
    }

    ep2_steppe_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ep2_steppe_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = steppe
                }
                has_ep2_dlc_trigger = yes
            }
        }
    }

    mpo_mongol_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = mpo_mongol_war_nobility
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 80
                OR = {
                    portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = steppe
                    }
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = steppe
                    }
                }
                has_mpo_dlc_trigger = yes
            }
            modifier = { # Not used by Turkic peoples of the Western steppes
                factor = 0
				OR = {
                    portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = fp3_turkic
                    }
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = steppe
                    }
                }
				OR = {
					has_fp3_dlc_trigger = yes
					has_mpo_dlc_trigger = yes
				}
            }
        }
    }

    ## Northern ##

    northern_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = northern_war
                accessory = m_headgear_sec_northern_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = northern
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = northern
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = northern
                    }
                }
            }
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = sami
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = sami
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = sami
                    }
                }
            }
        }
    }

    northern_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = northern_war
                accessory = m_headgear_sec_northern_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = northern
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = northern
                }
            }
            modifier = {
                add = 50
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = sami
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = sami
                }
            }
        }
    }

## FP2 Fate of Iberia ##

	fp2_iberian_muslim_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp2_muslim_war_nobility
				accessory = m_headgear_sec_fp2_iberian_muslim_war_nob_01_lo
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 # slightly higher
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp2_iberian_muslim
                }
        		OR = {
                    	portrait_commoner_armor_trigger = {
                        	CULTURE_INPUT = fp2_iberian_muslim
                    	}
                    	portrait_low_nobles_armor_trigger = {
                        	CULTURE_INPUT = fp2_iberian_muslim
                    	}
        		}
			}
		}
	}

	fp2_iberian_muslim_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = fp2_muslim_war_nobility
				accessory = m_headgear_sec_fp2_iberian_muslim_war_nob_01_hi
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 90 # slightly higher
				portrait_war_nobles_fancy_helmet_trigger = yes
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp2_iberian_muslim
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = fp2_iberian_muslim
                }
            }
        }
    }

    fp2_iberian_christian_war_low_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = fp2_christian_war_nobility
                accessory = m_headgear_sec_fp2_iberian_christian_war_nob_01_lo
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 90 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp2_iberian_christian
                }
                OR = {
                    portrait_commoner_armor_trigger = {
                        CULTURE_INPUT = fp2_iberian_christian
                    }
                    portrait_low_nobles_armor_trigger = {
                        CULTURE_INPUT = fp2_iberian_christian
                    }
                }
            }
            modifier = {
                factor = 0       # Should NOT show up if EP2 is active and we're not in the right era
                has_ep2_dlc_trigger = yes
                NOT = {
                	portrait_era3_trigger = yes
                }
            }
        }
    }

    fp2_iberian_christian_war_high_nobles = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = fp2_christian_war_nobility
                accessory = m_headgear_sec_fp2_iberian_christian_war_nob_01_hi
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 90 # larger than the western war headgear
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp2_iberian_christian
                }
                portrait_high_nobles_armor_trigger = {
                    CULTURE_INPUT = fp2_iberian_christian
                }
            }
            modifier = {
                factor = 0       # Should NOT show up if EP2 is active and we're not in the right era
                has_ep2_dlc_trigger = yes
                NOT = {
                	portrait_era3_trigger = yes
                }
            }
        }
    }

    ## FP1 Norse ##

    fp1_norse_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = fp1_war
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60 # slightly higher than northern
                portrait_war_nobles_fancy_helmet_trigger = yes
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp1_norse
                }
            }
        }
    }

    fp1_norse_war_common = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = fp1_war_common
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        weight = {
            base = 0
            modifier = {
                add = 60
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = fp1_norse
                }
            }
        }
    }

    ## Sub-Saharan Africans ##

    sub_saharan_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = mena_war
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 100
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = african
                }
            }
        }
    }

	## AFR ##

	afr_berber_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = afr_war
				range = { 0 1 } # For the randomness to work correctly
			}
		}
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101 # slightly higher than mena
                OR = {
                    portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = afr_berber
                    }
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = afr_berber
                    }
                }
            }
        }
	}

	## POL ##

	pol_west_slavic_era1_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
                accessory = m_headgear_sec_pol_era1_war_nob_01
			}
		}
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101
				OR = {
					portrait_era1_armor_trigger = yes
					portrait_era2_armor_trigger = yes
				}
                OR = {
                    portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = west_slavic
                    }
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = west_slavic
                    }
                }
            }
        }
	}

	pol_west_slavic_era3_war_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
                accessory = m_headgear_sec_pol_era3_war_nob_01
			}
		}
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 100
				portrait_era3_armor_trigger = yes
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
            }
        }
	}

	pol_west_slavic_era3_war_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
                accessory = m_headgear_sec_pol_era3_war_nob_01
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = pol_crest
                range = { 0 1 } # For the randomness to work correctly
			}
		}
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 101
				portrait_era3_armor_trigger = yes
				portrait_war_nobles_helmet_trigger = {
					CULTURE_INPUT = west_slavic
				}
				portrait_high_nobles_armor_trigger = {
					CULTURE_INPUT = west_slavic
				}
            }
        }
	}

	pol_west_slavic_era4_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
                accessory = m_headgear_sec_pol_era4_war_nob_01
			}
		}
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 102
				portrait_era4_armor_trigger = yes
                OR = {
                    portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = west_slavic
                    }
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = west_slavic
                    }
                }
            }
        }
	}

	pol_west_slavic_era4_war_royalty = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = headgear
				template = pol_war
                accessory = m_headgear_sec_pol_era4_war_nob_01
			}
			accessory = {
				mode = add
				gene = additive_headgear
				template = pol_crown
                range = { 0 1 } # For the randomness to work correctly
			}
		}
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 103
				portrait_era4_armor_trigger = yes
				OR = {
					portrait_royalty_armor_trigger = {
						CULTURE_INPUT = west_slavic
					}
					AND = {
						portrait_imperial_trigger = {
							CULTURE_INPUT = west_slavic
						}
						OR = {
							has_character_flag = need_military_outfit
							portrait_wear_armor_trigger = yes
						}
					}
				}
            }
        }
	}



    ## FP3 Iranian ##

    fp3_iranian_war = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = fp3_iranian_war
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 60 # slightly higher than mena
                OR = {
                    portrait_war_nobles_helmet_trigger = {
                        CULTURE_INPUT = fp3_iranian
                    }
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = fp3_iranian
                    }
                }
                has_fp3_dlc_trigger = yes
            }
        }
    }

    ## CCP4

    ccp4_ugro_permian_war_commoner = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ccp4_khanty_war
                range = { 0 0.3 } # For the randomness to work correctly
            }
        }
        weight = {
            base = 0
            modifier = {
                add = 100
                portrait_commoner_armor_trigger = {
                    CULTURE_INPUT = ugro_permian
                }
                has_cp4_dlc_trigger = yes
            }
        }
    }

    ccp4_ugro_permian_war_low_nobility = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ccp4_khanty_war
                range = { 0.4 0.6 } # For the randomness to work correctly
            }
        }
        weight = {
            base = 0
            modifier = {
                add = 100
                portrait_low_nobles_armor_trigger = {
                    CULTURE_INPUT = ugro_permian
                }
                has_cp4_dlc_trigger = yes
            }
        }
    }

    ccp4_ugro_permian_war_high_nobility = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = ccp4_khanty_war
                range = { 0.7 1.0 } # For the randomness to work correctly
            }
        }
        weight = {
            base = 0
            modifier = {
                add = 100
                OR = {
                    portrait_high_nobles_armor_trigger = {
                        CULTURE_INPUT = ugro_permian
                    }
                    portrait_royalty_armor_trigger = {
                        CULTURE_INPUT = ugro_permian
                    }
                }
                has_cp4_dlc_trigger = yes
            }
        }
    }

	ce2_cumanian_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = special_headgear_face_mask
				template = fp3_iranian_face_mask_open
				range = { 0 1 }
			}
			accessory = {
				mode = add
				gene = headgear
				template = mpo_mongol_war_nobility
				value = 1
			}
		}
		outfit_tags = { military_outfit }
		weight = {
			base = 0
			modifier = {
				add = 999
				OR = {
					culture = culture:cuman
					culture = {
						any_parent_culture_or_above = {
							this = culture:cuman
						}
					}
				}
				portrait_wear_armor_currently_in_army_trigger = yes
			}
		}
	}


    # Shogunate

    japanese_war_helmet_era1_high = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = shogunate_war_helmet
                value = 0
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 100
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = japanese
                }
                shogunate_armor_era1_trigger = yes
            }
        }
    }
    japanese_war_helmet_era2_high = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = shogunate_war_helmet
                range = { 0 1 } # For the randomness to work correctly
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 100
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = japanese
                }
                shogunate_armor_era2_trigger = yes
            }
        }
    }
    japanese_war_helmet_era3_high = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = headgear
                template = shogunate_war_helmet
                value = 1
            }
        }
        outfit_tags = { military_outfit }
        weight = {
            base = 0
            modifier = {
                add = 100
                portrait_war_nobles_helmet_trigger = {
                    CULTURE_INPUT = japanese
                }
                shogunate_armor_era3_trigger = yes
            }
        }
    }
}
